home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
comms
/
other
/
aminetparse
/
aminetparse.doc
< prev
next >
Wrap
Text File
|
1999-05-14
|
12KB
|
271 lines
AminetParse v1.09
© 1997 by Daniel J. Andrea II
NOTE: This software is offered as GIFTWARE. If you like it, then you can
send me something in payment of your choice (other programs, disks, computers,
cars, etc.) at the address at the end of this document. No warranty of any
kind is offered with this software or implied, or for suitability of purpose.
It's use is entirely at your own risk. No fees can be charged for this
software, other than the nominal fees for the cost of magnetic media and
copying of the software onto that media, not to exceed the amount of US $5 for
a disk containing this software. Copies of this software must include this
documentation file for redistribution through Fred Fish or other similar
software collections.
Attention: This software's Aminet status has been slightly changed. I continue
to receive offers for a 'free' Aminet CD as a contibutor. However, the cost to
me is anything but free. It would cost nearly as much to order it from Germany
as just buying it from a United States based mail order company. This is not
free. This program, and all my other software that is on Aminet, has now been
marked to not be distributed on ANY of the Aminet CDs, unless and until the
status of the 'free' CD for contributors becomes truely free again (i.e. at
absolutely NO cost to me).
What is it?
===========
AminetParse is a small utility to parse Aminet RECENT or INDEX lists into
Thor's file database. This is quite a bit faster than the arexx script
supplied with Thor. I experimented quite a bit with the arexx script, but
the best I could get with it was approximately 22 files added per second.
AminetParse is quite fast. On my system, it reaches speeds in excess of
150 files added per second. In some cases I've seen it hit peaks of over
200 files per second!
RECENT/INDEX files can be filtered with the Sortmail.excl file, just like in
Sortmail. Also, as of AminetParse 1.05, a NewFiles.txt file will be created
in the proper directory just like Sortmail does. This will only be done on
RECENT listings. AminetParse does absolutely nothing with the NewFiles.txt
file when parsing INDEX listings. AminetParse will ignore any 'Message of
the day:' that may be placed at the end of a RECENT listing. I may change
this in the near future to create a message in the email conference of Thor
of the info contained within the 'Message of the day:' section.
Note: NewFiles.txt will be replaced completely every time AminetParse is
run with a RECENT listing.
AminetParse requires Thor 2.3+ (at least ver 4 of bbsread.library) and
AmigaOS 2.04+.
Installation
============
Well, it's real simple. AminetParse is a cli-only program, and can be run
from anywhere. Probably the best place would be in the bin sub-directory
of Thor's main directory. Just copy it to wherever you want to run it
from.
Just copy the AddAminet.thor script to Thor:rexx, and make sure AminetParse
is in Thor:bin. Then it can be run from within Thor whenever you want to
parse a RECENT or INDEX listing into the database. With this archive is a
new version of AddAminet.thor that can handle GZip compressed INDEX or
RECENT listings.
Usage
=====
AminetParse is a shell-only program. If you try to start it from the
Workbench, you will most likely crash your machine.
Just type AminetParse in a shell and you'll get output like this:
AminetParse 1.09 (21-Apr-99) © 1997-1999 Daniel J. Andrea II
Usage: AminetParse <system name> <INDEX/RECENT file> EXCLUDE QUIET
where <system name> is name of system to add files to
<INDEX/RECENT file> is full path and name of INDEX/RECENT file
EXCLUDE (optional) tells AminetParse to use the Sortmail.excl file
from inside the BBS's data directory to exclude certain file
areas from being added to the database.
QUIET (optional) turns off all console output while parsing files
All you need is the name of your System in Thor, as in EMail&News (that's
my BBS system name), and the full path and name of the INDEX/RECENT file.
For example:
AminetParse EMail&News SYS:temp/INDEX
will add the file INDEX from the drawer SYS:temp/ to the file database in
the Thor system EMail&News.
Or add EXCLUDE:
AminetParse EMail&News SYS:temp/INDEX EXCLUDE
will do the same as the previous example, but will use the Sortmail.excl
file from inside the data directory of the BBS you enter. If there is no
Sortmail.excl file, AminetParse will continue as if the EXCLUDE option
hadn't been entered along with a warning message.
If you add QUIET, it will turn off console output during parsing of the
files. The final stats output will remain after parsing is complete.
The placement of the system name and INDEX/RECENT file name need to be
in the order shown and immediately following the command name. The EXCLUDE
and QUIET options can be placed in any order after the file name.
That's it!
While AminetParse is running, you will get occasional status messages
unless the QUIET option is enabled. First it will tell you whether this
is a RECENT listing, such as daily or weekly, or a full INDEX. Then it
will print out numbers periodically to show how many files have been
processed. Whenever a file area is parsed that is not in the file
database, it will automatically add it and print out a message that it
did so.
When it's finished, AmintParse will print out some statistics about the
file parsing.
To parse listings while Thor is running, just execute the rexx script
AddAminet.thor from the rexx menu. It will check for the presence of
a SortMail.excl file and prompt you if you want to filter with it.
AddAminet.thor will also prompt you to clear the file database if you are
parsing a full INDEX listing. Oh, and you no longer need to uncompress
the file for AddAminet.thor. It now handles GZip compressed files
automatically.
AminetParse now skips any extraneous data before the first real index listing
line in the file. So if you save the message to disk from Thor, you no longer
need to edit out all the header information at the start of the file.
AminetParse will check each line of text, starting from the beginning of the
file, and checks to see if the line starts with the '|' character. If it
does, then it will check to see if the same line also contains either of the
two words 'Complete' or 'Recent'. If the line does not contain one of those
words, it will scan to the end of file until it does find it. If no start
line for the listing is found, it will exit to the shell without doing
anything to the database.
Bugs
====
There are no known bugs at this time. If you find any, please contact me
at the E-Mail address or Snail-Mail address below with bug reports. Be
sure to include information on what other software was running and what
kind of system you have. Bug fixes will be incorporated into AminetParse
as soon as possible.
PLEASE, please let me know if there is a problem with the parsing of a
particular file. The 1.09 bug fix was probably long overdue, because I
simply had not heard of the problem! If there is a problem parsing an
INDEX or RECENT listing from ANYWHERE, let me know and send a copy of it
to me if possible. It's the only way I can fix the problem! Thanks.
History
=======
v1.00 -- Initial release.
v1.01 -- Added filtering based on the Sortmail script's filtering.
AminetParse uses the same file format, and will read the
file Sortmail.excl from the BBS's data directory.
v1.02 -- Well, it did have a bug. Found my date calculation was
off by a couple of days. Now shows correct date.
v1.03 -- Added Checking for valid INDEX/RECENT file. Removed a
warning message that wasn't needed. Should fix some
problems noted by Trevor Daley.
v1.04 -- Changed date calculation again. This version should work
better now.
v1.05 -- Added NewFiles.txt creation during parsing of RECENT
listings.
v1.06 -- Fixed the parsing of weekly RECENT listings. Previous